﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdateUser.aspx.cs" Inherits="admin_UpdateUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    
        <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
    <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>
    <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>

    <style type="text/css">
        <!--
        html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
        scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
        -->
    </style>

</head>
<body>
    <form id="form1" runat="server">
            <div class="sub_right_top">
  <div class="hdm_header" >
    <div class="tb1_on"><h2 class="h2_icon">用户管理</h2></div>

    <div class="clear"></div>
  </div>
  <div class="hdm_footer">            
    <div style="height:20px;"></div>
    <form id="form2" name="form1" method="post" action="">  
    <table width="95%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0" style="border-collapse:collapse; ">
      <tr>
        <td width="100">登录名：</td>
        <td>
            <asp:Label ID="lblLoginNameText" runat="server"></asp:Label>
         </td>
        <td width="100">真实姓名：</td>
        <td>
            <asp:TextBox ID="txtUserName" runat="server" Width="80%"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td width="100">学历：</td>

        <td>
          <asp:DropDownList ID="ddlAcademicCertificate" runat="server" Font-Size="12px">
                        <asp:ListItem Value="1">本科</asp:ListItem>
                        <asp:ListItem Value="2">大专</asp:ListItem>
                        <asp:ListItem Value="3">中专</asp:ListItem>
                    </asp:DropDownList></td>
        <td width="100">权限组：</td>
        <td>
          <asp:DropDownList ID="ddlPopedomGroup" runat="server" DataSourceID="PopedomGroupDataSource" DataTextField="PopedomGroupName" DataValueField="PopedomGroupId" Font-Size="12px">
                    </asp:DropDownList> </td>

      </tr>
      <tr>
        <td width="100">所属部门：</td>
        <td>
            <asp:Label ID="lblSection" runat="server"></asp:Label>
        </td>

        <td width="100">职位：</td>
        <td>
            <asp:Label ID="ddlJob" runat="server"></asp:Label>
        </td>
      </tr>
      <tr>

        <td width="100">工资：</td>
        <td>
          <asp:TextBox ID="txtWage" runat="server" Width="80px"></asp:TextBox>   </td>
        <td width="100">手机号：</td>
        <td>
          <asp:TextBox ID="mob" runat="server"></asp:TextBox></td>
      </tr>

      <tr>
        <td width="100">电话：</td>
        <td>
            <asp:TextBox ID="txtTelephone" runat="server" Width="80%"></asp:TextBox>
          </td>
        <td width="100">性别：</td>
        <td>
          <asp:DropDownList ID="ddlSex" runat="server" Font-Size="12px">
                        <asp:ListItem Value="true">男</asp:ListItem>
                        <asp:ListItem Value="false">女</asp:ListItem>
                    </asp:DropDownList></td>
      </tr>
      <tr>
        <td width="100">地址：</td>
        <td>

          <asp:TextBox ID="txtAddress" runat="server" Width="80%"></asp:TextBox>  </td>
        <td width="100">民族：</td>
        <td>
          <asp:DropDownList ID="ddlNation" runat="server" DataSourceID="nationDataSource" DataTextField="NationName" DataValueField="NationId" Font-Size="12px">
                    </asp:DropDownList> </td>

      </tr>
      <tr>
        <td width="100">身份证号：</td>
        <td>
          <asp:TextBox ID="txtIDCard" runat="server" Width="80%"></asp:TextBox></td>
        <td width="100">Email：</td>
        <td>
         <asp:TextBox ID="txtEmail" runat="server" Width="80%"></asp:TextBox> </td>
      </tr>
      <tr>
        <td width="100">毕业院校：</td>
        <td>
          <asp:TextBox ID="txtFinishShool" runat="server" Width="80%"></asp:TextBox>    </td>
        <td width="100">毕业时间：</td>
        <td>
          <asp:TextBox ID="txtFinishShoolTime" runat="server" CssClass="Wdate" onClick="WdatePicker()" Width="80%"></asp:TextBox></td>
      </tr>
     
      <tr>
        <td colspan="4" align="center"><div class="disk_queding_top">
        <asp:Button ID="btnSubmit" runat="server" Text="" OnClick="btnSubmit_Click" OnClientClick="return checkfrm()" CssClass="tijiao_anniu"/>
        </div>
            <div class="disk_queding_top">
                <input id="btnReset" type="reset" value=""  class="section_congzhi_button"/>
            </div><div class="disk_queding_top">
            <asp:Button ID="btnBack" runat="server" PostBackUrl="~/admin/UserList.aspx" Text="" CssClass="fanhui_anniu"/>
            </div></td>
        </tr>
    </table>
    <div style="height:20px;"></div>
    </form>
  </div>
</div>

<asp:ObjectDataSource ID="nationDataSource" runat="server" SelectMethod="FindAll"
                        TypeName="TarreOA.TarreOABLL.NationManager"></asp:ObjectDataSource>
        <asp:ObjectDataSource ID="PopedomGroupDataSource" runat="server" SelectMethod="FindAll"
            TypeName="TarreOA.TarreOABLL.PopedomGroupManager"></asp:ObjectDataSource>
         <asp:ObjectDataSource ID="JobDataSource" runat="server" SelectMethod="FindAll" TypeName="TarreOA.TarreOABLL.JobManager">
         </asp:ObjectDataSource>


     </form>
</body>
</html>
<script type="text/javascript">
    function checkfrm()
    {
        if(document.getElementById('txtUserName').value =='')
        {
            alert('真实姓名不能为空！');
            return false;
        }
        if(document.getElementById('txtIDCard').value != '')
        {
            var reg=/\d{17}[\d|X]|\d{15}/;
            if(!reg.test(document.getElementById('txtIDCard').value))
            {
                alert('身份证号格式不正确！');
                return false;   
            }
        }
        if(document.getElementById('txtEmail').value != '')
        {
            var reg=/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
            if(!reg.test(document.getElementById('txtEmail').value))
            {
                alert('Email格式不正确！');
                return false;   
            }
        }
        if(document.getElementById('txtFinishShool').value.length > 50)
        {
            alert('毕业院校长度必须小于50个字符！');
            return false;
        }
        if(document.getElementById('txtTelephone').value.length > 20)
        {
            alert('电话长度必须小于20个字符！');
            return false;
        }
        if(document.getElementById('txtWage').value == '')
        {
            alert('工资不能为空！');
            return false;
        }
        var regWage=/^\d+(\.\d{1,2})?$/;
        if(!regWage.test(document.getElementById('txtWage').value))
        {
            alert('工资最多为2位小数！');
            return false;
        }
        return true;
    }
</script>